home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / cgazv4n3.zip / PRINTAPP.H < prev    next >
C/C++ Source or Header  |  1990-01-27  |  2KB  |  47 lines

  1. /********************  PRINTAPP.H  ---  Listing 4  *******************
  2.  * Author: Victor Volkman
  3.  * Purpose: Header file for PRINTCLI.C and PRINTSRV.C
  4.  * May be freely used if authorship is acknowledged
  5.  *********************************************************************/
  6.  
  7. #define SERVER_RTO 30   /* Client should not pause more than 15 secs. */
  8. #define SERVER_STO  0   /* Server doesn't SEND in this application    */
  9. #define CLIENT_RTO  0   /* Client doesn't RECEIVE in this application */
  10. #define CLIENT_STO 30   /* Server should not pause more than 15 secs. */
  11.  
  12. /* return values from printsrv.exe: */
  13. #define SRV_OK              0
  14. #define SRV_NO_NETBIOS      1
  15. #define SRV_NO_ARGS         2
  16. #define SRV_BAD_FILE        3
  17. #define SRV_BAD_SERVER_NAME 4
  18. #define SRV_CANT_LISTEN     5
  19.  
  20. /* return values from printcli.exe: */
  21. #define CLI_OK              0
  22. #define CLI_NO_NETBIOS      1
  23. #define CLI_NO_ARGS         2
  24. #define CLI_BAD_FILE        3
  25. #define CLI_BAD_CLIENT_NAME 4
  26. #define CLI_CANT_CALL       5
  27. #define CLI_SEND_FAILED     6
  28.  
  29. #define MAX_MSG_LEN 4096  /* arbitrary largest msg we will send */
  30.  
  31. #define PRINTER_INT    0x17  /* BIOS printer interface       */
  32. #define PRINTER_STATUS 0x02  /* INT 17h sub-function         */
  33. #define STATUS_MASK    0xF9  /* masks off unused status bits */
  34.  
  35. #define RD_FLAGS (O_BINARY|O_RDONLY)
  36. #define WR_FLAGS (O_BINARY|O_WRONLY|O_TRUNC|O_CREAT)
  37.  
  38. typedef struct print_msg {
  39.    char filename[80];
  40.    int length;
  41.    char buffer[MAX_MSG_LEN];
  42.    } PRINT_MSG;
  43.  
  44. char *default_server_name = "PRINTSRV";
  45. char *default_client_name = "PRINTCLI";
  46.  
  47. int nb_debug;